home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
nihcl-30.lha
/
nihcl-3.0
/
ex
/
Line.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-05-15
|
907b
|
30 lines
#ifndef LINE_H
#define LINE_H
// Line.h -- Line shape
// $Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/ex/RCS/Line.h,v 3.0 90/05/15 22:43:40 kgorlen Rel $
#include "Shape.h"
class Line: public Shape {
DECLARE_MEMBERS(Line);
Point p; // end point
protected: // storer() functions for object I/O
virtual void storer(OIOofd&) const;
virtual void storer(OIOout&) const;
public:
Line(const Point& a, const Point& b) : Shape(a), p(b) {}
bool operator==(const Line&) const;
bool operator!=(const Line& a) const { return !(*this==a); }
virtual void move(const Point& d);
virtual void draw() const;
virtual void deepenShallowCopy();
virtual unsigned hash() const;
virtual bool isEqual(const Object&) const;
virtual void printOn(ostream& strm =cout) const;
virtual const Class* species() const;
};
#endif